package com.ssy.lingxi.common.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;

/**
 * 用于在非Spring托管的类中，使用注入的MessageSource bean
 * @author jw.chen
 * @version 2.0.0
 * @date 2022-01-27
 */
@Component
public class I18nUtils {
    public static MessageSource messageSource;

    @Autowired
    public void setMessageSource(MessageSource messageSource)
    {
        I18nUtils.messageSource = messageSource;
    }
}
